home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_6 / ETHTOOL.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  80 lines

  1. /* $Id: ethtool.h,v 1.1 1998/12/19 15:09:38 davem Exp $
  2.  * ethtool.h: Defines for SparcLinux ethtool.
  3.  *
  4.  * Copyright (C) 1998 David S. Miller (davem@dm.cobaltmicro.com)
  5.  */
  6.  
  7. #ifndef _SPARC_ETHTOOL_H
  8. #define _SPARC_ETHTOOL_H
  9.  
  10. /* We do things like this so it does not matter what kernel
  11.  * headers you have on your system etc.
  12.  */
  13. #undef SIOCETHTOOL
  14. #define SIOCETHTOOL    (SIOCDEVPRIVATE + 0x0f)
  15.  
  16. /* This should work for both 32 and 64 bit userland. */
  17. struct ethtool_cmd {
  18.     u32    cmd;
  19.     u32    supported;
  20.     u16    speed;
  21.     u8    duplex;
  22.     u8    port;
  23.     u8    phy_address;
  24.     u8    transceiver;
  25.     u8    autoneg;
  26. };
  27.  
  28. /* CMDs currently supported */
  29. #define SPARC_ETH_GSET        0x00000001    /* Get settings, non-privileged. */
  30. #define SPARC_ETH_SSET        0x00000002    /* Set settings, privileged. */
  31.  
  32. /* Indicates what features are supported by the interface. */
  33. #define SUPPORTED_10baseT_Half        0x00000001
  34. #define SUPPORTED_10baseT_Full        0x00000002
  35. #define SUPPORTED_100baseT_Half        0x00000004
  36. #define SUPPORTED_100baseT_Full        0x00000008
  37. #define SUPPORTED_1000baseT_Half    0x00000010
  38. #define SUPPORTED_1000baseT_Full    0x00000020
  39. #define SUPPORTED_Autoneg        0x00000040
  40. #define SUPPORTED_TP            0x00000080
  41. #define SUPPORTED_AUI            0x00000100
  42. #define SUPPORTED_MII            0x00000200
  43. #define SUPPORTED_FIBRE            0x00000400
  44.  
  45. /* The following are all involved in forcing a particular link
  46.  * mode for the device for setting things.  When getting the
  47.  * devices settings, these indicate the current mode and whether
  48.  * it was foced up into this mode or autonegotiated.
  49.  */
  50.  
  51. /* The forced speec, 10Mb, 100Mb, gigabit. */
  52. #define SPEED_10        10
  53. #define SPEED_100        100
  54. #define SPEED_1000        1000
  55.  
  56. /* Duplex, half or full. */
  57. #define DUPLEX_HALF        0x00
  58. #define DUPLEX_FULL        0x01
  59.  
  60. /* Which connector port. */
  61. #define PORT_TP            0x00
  62. #define PORT_AUI        0x01
  63. #define PORT_MII        0x02
  64. #define PORT_FIBRE        0x03
  65.  
  66. /* Which tranceiver to use. */
  67. #define XCVR_INTERNAL        0x00
  68. #define XCVR_EXTERNAL        0x01
  69. #define XCVR_DUMMY1        0x02
  70. #define XCVR_DUMMY2        0x03
  71. #define XCVR_DUMMY3        0x04
  72.  
  73. /* Enable or disable autonegotiation.  If this is set to enable,
  74.  * the forced link modes above are completely ignored.
  75.  */
  76. #define AUTONEG_DISABLE        0x00
  77. #define AUTONEG_ENABLE        0x01
  78.  
  79. #endif /* _SPARC_ETHTOOL_H */
  80.